<extend name="Extends/base"/>
<block name="title">用户信息</block>
<block name="css">
</block>
<block name="body_style">class="bgc-ff4"</block>
<block name="body">
    <div class="c-main pb20">
        <div class="st-topcont">
            <img src="__APPS__/images/stimg.jpg">
            <div class="st-title">
                <p>收徒赚钱可以获得徒弟任务金额的20%收益</p>
                <p>赶紧收徒躺赚吧！</p>
                <h5>徒弟完成10元任务，师傅可获额外2元收益</h5>
            </div>
        </div>

        <div class="st-cont">
            <div class="message-tip">
                <i></i>
                <a href="javascript:;"
                   data-href="/Recomm/help"
                   class="jump-href">还是不懂？点击了解收徒机制</a>
            </div>
            <div class="st-balance">
                <div class="st-balance-img">
                    <img src="__APPS__/images/st1.png">
                </div>
                <div class="st-balance-info">
                    <p>累计邀请现金奖励（元）</p>
                    <p class="st-balance-money">{:changePrice($income)}</p>
                </div>
            </div>
            <div class="st-apprentice">
                <div class="st-apprentice-img">
                    <img src="__APPS__/images/st2.png">
                </div>
                <div class="st-apprentice-info">
                    <p>累计收徒（个）</p>
                    <p class="st-apprentice-num">{$recommNum}</p>
                </div>
                <div class="st-apprentice-btn">
                    <a href="javascript:;"
                       data-href="/Recomm/recommList"
                       class="jump-href">查看</a>
                </div>
            </div>
            <a href="javascript:;" class="poster-btn">生成邀请海报</a>
        </div>
    </div>

    <div class="poster-maskr maskr c-hide"></div>
    <!-- S 弹窗海报 -->
    <div class="poster-cont st-tip plr15 c-hide">
        <div class="st-poster">
            <img id="posterImg" src="">
        </div>
    </div>
</block>
<block name="js">
    <script type="text/javascript" src="__APPS__/js/api.js?v={:C('JS_CSS_VERSION')}"></script>

    <script type="text/javascript">
        $('.poster-btn').on('click', function () {
            doGetRecommPoster(function (res) {
                if (res.Code != 10000) {
                    $.toast(res.Message);
                    return false;
                }
                var url = res.Result;
                $('#posterImg').attr("src", url);
                $('.poster-maskr,.poster-cont').show();
            });
        });
        $('.poster-maskr,.poster-cont').on('click', function () {
            $('.poster-maskr,.poster-cont').hide();
        })
    </script>
</block>